APPNAME=bspawner

SRC_DIR=src
OUT_DIR=ebin
DOC_DIR=doc
DOC_OPTS={def,{version,\"0.1\"}}

all: clean prepare edoc
	erlc -o $(OUT_DIR) $(SRC_DIR)/*.erl
	@echo Moving app


prepare:
	@echo Creating dirs
	mkdir $(OUT_DIR)
	mkdir $(DOC_DIR)

clean:
	@echo Cleaning...
	rm -rf $(OUT_DIR)
	rm -rf $(DOC_DIR)

edoc:
	@echo Generating docs...
	erl -noshell -eval "edoc:application($(APPNAME), \".\", [$(DOC_OPTS)])" -s init stop
	@echo Docs done...




